#pragma once

#include "ssbase/base_export.h"
#include "sstrace/trace_export.h"

#define _SSWINOSL_BEGIN		namespace sswinosl {
#define _SSWINOSL_END		}
#define _SSWINOSL			ssl::sswinosl::
#define _SSWINOSL_USE_NP	using namespace ssl::sswinosl;

#ifdef FORCELIB
#define SSWINOS_API
#define SSWINOS_CLASS
#else
#ifdef SSWINOS_EXPORTS
#define SSWINOS_API _declspec(dllexport)
#define SSWINOS_CLASS _declspec(dllexport)
#else
#define SSWINOS_API _declspec(dllimport)
#define SSWINOS_CLASS _declspec(dllimport)
#endif
#endif

#include <Windows.h>
#include <tchar.h>
#include <ObjIdl.h>

_SSL_BEGIN
_SSWINOSL_BEGIN

#define BOOL2bool(B) B ? true : false
#define bool2BOOL(b) b ? TRUE : FALSE

SSWINOS_API void win_center_window(
	ss_in_ HWND parent_win_h,
	ss_in_ SIZE win_size,
	ss_out_ RECT &win_rt
	);


SSWINOS_API bool os_isxp();

SSWINOS_API bool is_valid_address(
	const void* p,
	size_t bytes,
	bool f_read_write  = true
	);

SSWINOS_API HGLOBAL copy_global_memory(HGLOBAL dest_h, HGLOBAL src_h);

SSWINOS_API LPSTREAM create_memory_stream();

_SSWINOSL_END
_SSL_END


